package com.qf.springmvc.controller;

import com.qf.springmvc.entity.User;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.SessionAttributes;

/**
 * @author zed
 * @date 2022/5/3 9:38
 */
@Controller
@RequestMapping("/job")
@SessionAttributes("user") // 把model中的user复制放到session中
public class JobController {

    @RequestMapping("test1")
    public String test1(User user, Model model){
        model.addAttribute(user);
        return "show";
    }
}
